<?php

declare(strict_types=1);

namespace App\CustHub\Mapper;

use App\CustHub\Model\ChTagGroup;
use Mine\Abstracts\AbstractMapper;

/**
 * @deprecated
 */
class ChTagGroupMapper extends AbstractMapper
{
    public function assignModel()
    {
        $this->model = ChTagGroup::class;
    }

    /**
     * @return array
     */
    public function getGroupList(): array
    {
        $list = $this->model::query()
            ->select(['id','name'])
            ->orderBy('sort','desc')
            ->get()->toArray();
        return $list;
    }

    /**
     * @return array
     */
    public function getSelectList(): array
    {
        $list = $this->model::query()
            ->select(['id','name'])
            ->where('code','<>','custom')
            ->orderBy('sort','desc')
            ->get()->toArray();
        return $list;
    }

}